<?php
use \Workerman\Autoloader;

require_once __DIR__ . '/../../../../../Workerman/Autoloader.php';
require_once __DIR__.'/../../../Config/Const.php';
Autoloader::setRootPath(__DIR__.'/../../..');

$page_groupId = GROUP_SYS_ANNOUNCEMENT_MNG;
$page_pageId = PAGE_ANNOUNCEMENT_TO_RESTAURANT_LIST;

require "../framepages/moudle_base.php";

?>
<div class="main-content">
    <div>
        <table>
            <tr>
                <th width="8%">广播id</th>
                <th width="15%">广播内容</th>
                <th width="8%">发送时间</th>
                <th width="8%">操作</th>
            </tr>
            <?php
                $system_announcement_to_restaurant_list = \Data\System_announcement_to_restaurant_DAO::getList();
                foreach ($system_announcement_to_restaurant_list as $system_announcement_to_restaurant_record) {
                    $announcement_id = $system_announcement_to_restaurant_record->getANNOUNCEMENT_ID();
                    $announcement_content = $system_announcement_to_restaurant_record->getANNOUNCEMENT_CONTENT();
                    $created_on = $system_announcement_to_restaurant_record->getCREATED_ON();
                    echo "
                        <tr>
                            <td>$announcement_id</td>
                            <td>$announcement_content</td>
                            <td>$created_on</td>
                            <td><button class='btn btn-danger' onclick='doGetInfo($announcement_id)' >详情</button></td>
                        </tr>
                    ";
                }
            ?>
        </table>
    </div>

    <?php
    require "../framepages/footer.php";
    ?>
</div>
</div>
<script src="../lib/bootstrap/js/bootstrap.js"></script>
</body>
</html>
